import request from '@/utils/request'

// 查询领养管理列表
export function listAdopt(query) {
  return request({
    url: '/web/adopt/list',
    method: 'get',
    params: query
  })
}

// 查询领养管理详细
export function getAdopt(adoptId) {
  return request({
    url: '/web/adopt/' + adoptId,
    method: 'get'
  })
}

// 新增领养管理
export function addAdopt(data) {
  return request({
    url: '/web/adopt',
    method: 'post',
    data: data
  })
}

// 修改领养管理
export function updateAdopt(data) {
  return request({
    url: '/web/adopt',
    method: 'put',
    data: data
  })
}

// 删除领养管理
export function delAdopt(adoptId) {
  return request({
    url: '/web/adopt/' + adoptId,
    method: 'delete'
  })
}
// 同意领养申请
export function agreeAdopt(adoptIds,adoptPetId) {
  return request({
    url: '/web/adopt/agreeAdopt',
    method: 'get',
    params:{
      adoptId:adoptIds,
      adoptPetId:adoptPetId
    }
  })
}
// 同意领养申请
export function disAgreeAdopt(adoptIds) {
  return request({
    url: '/web/adopt/disAgreeAdopt',
    method: 'get',
    params:{
      adoptId:adoptIds,
    }
  })
}
// 添加反馈信息
export function addText(adoptId,disAgreeText) {
  return request({
    url: '/web/adopt/addText',
    method: 'get',
    params:{
      adoptId:adoptId,
      disAgreeText:disAgreeText
    }
  })
}

// 添加反馈信息
export function getList(customerId,status) {
  return request({
    url: '/web/adopt/getlist',
    method: 'get',
    params:{
      customerId:customerId,
      status:status
    }
  })
}
